'use strict';
const db = uniCloud.database()
exports.main = async ({action,params}, context) => {
	const collection = db.collection('cnofig')
	//collection.add({contactImage :"https://img.yourtools.icu/wx.jpg" ,shareImage : 'https://img.yourtools.icu/chihe-share.jpg' })
	let res =null;
	if(action=="add"){
		res = await collection.add(params)
	}else if(action=="get"){
		res = await collection.limit(1).get()
	}else if(action=="upd"){
		res = await collection.update(params)
	}
	return res
};
